// https://nuxt.com/docs/api/configuration/nuxt-config
import { loadEnv } from 'vite';

const env = loadEnv(
  process.env.NODE_ENV || 'development',
  process.cwd(),
  'NUXT_'
);

export default defineNuxtConfig({
  compatibilityDate: '2025-05-15',
  devtools: { enabled: true },
  app: {
    pageTransition: { name: 'page', mode: 'out-in' }   //页面过渡
  },
  ssr: false,
  runtimeConfig: {
    public: {
      apiBaseUrl: env.NUXT_API_BASE_URL  // 前端请求后端的基础路径，可根据实际调整
    }
  },
  components: {
    dirs: [
      '~/components'
    ]
  },
  //  plugins: [
  //   '~/plugins/viewport.js'
  // ],
   modules: [
    '@nuxtjs/tailwindcss',
    '@element-plus/nuxt'
  ]
})
